<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../docs/images/zxl20070701.jpg">
    <title>svg测试用例</title>
</head>

<body>
    <svg width="400" height="400"></svg>

    <script type="module">
        import svgRender from "../src/tool/svg/index.js";

        var painter = svgRender(document.getElementsByTagName('svg')[0]);

        painter.appendBoard("text").config({
            "fontSize": 50,
            "textAlign": "center"
        }).fillText("这是文字", 200, 200, 45);

        painter
            .config({
                "strokeStyle": "red"
            })
            .appendBoard("path").beginPath().moveTo(0, 200).lineTo(400, 200).stroke()
            .appendBoard("path").beginPath().moveTo(200, 0).lineTo(200, 400).stroke();

        painter.appendBoard("circle").fullCircle(100, 300, 100);

        painter.config({
            "fillStyle": "blue"
        }).appendBoard("rect").fillRect(300, 100, 50, 200);

    </script>

</body>

</html>